<script setup lang="ts">
import { computed } from "vue";

const props = defineProps<{
  modelValue?: number;
}>();

const emit = defineEmits(["update:modelValue", "change"]);
const value = computed({
  get: () => props.modelValue,
  set: value => {
    emit("update:modelValue", value);
    emit("change", value);
  }
});
</script>

<template>
  <el-switch v-model="value" :active-value="1" :inactive-value="0" />
</template>
<style lang="scss" scoped></style>
